package com.tour.tour.utils;

import com.tour.tour.dto.UserDTO;

/**
 * @author YounGCY
 * @date 2023-4-25 下午 4:28
 * @description
 */
public class UserHolder {
    private static final ThreadLocal<UserDTO> tl = new ThreadLocal<>();
    
    public static void saveUser(UserDTO user) { tl.set(user); }
    
    public static UserDTO getUser() { return tl.get(); }
    
    public static void removeUser() { tl.remove(); }
    
}
